/**
*@author       wuwg
*@createTime   2018/03/20
*@updateTime   2018/03/20
*@description
*@rule
 */
@import '../../../config/config.less';
@import '../../../mixins/clearfix/index.less';

@tabs-prefix-cls: ~"@{css-prefix}tabs";

.@{tabs-prefix-cls} {
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    color: @text-color;
    .clearfix;

    &-bar {
        outline: none;
    }

    &-ink-bar {
        height: 2px;
        box-sizing: border-box;
        background-color: @primary-color;
        position: absolute;
        left: 0;
        bottom: 1px;
        z-index: 2;
        transition: transform .3s @ease-in-out;
        transform-origin: 0 0;
    }

    &-bar {
        border-bottom: 1px solid @border-color-base;
        margin-bottom: 16px;
    }

    &-content-wrapper {
      overflow: hidden;
    }

    &-nav-container {
        margin-bottom: -1px;
        line-height: @line-height-base;
        font-size: @font-size-base;
        box-sizing: border-box;
        white-space: nowrap;
        overflow: hidden;
        position: relative;
        .clearfix;
    }

    &-nav-container-scrolling {
        padding-left: 32px;
        padding-right: 32px;
    }

    &-nav-wrap {
        overflow: hidden;
        margin-bottom: -1px;
    }

    &-nav-scroll {
        overflow: hidden;
        white-space: nowrap;
    }

    &-nav-right {
        float: right;
        margin-left: 5px;
    }

    &-nav-prev {
        position: absolute;
        line-height: 32px;
        cursor: pointer;
        left: 0;
    }

    &-nav-next {
        position: absolute;
        line-height: 32px;
        cursor: pointer;
        right: 0;
    }

    &-nav-scrollable {
        padding: 0 12px;
    }

    &-nav-scroll-disabled {
        display: none;
    }

    &-nav {
        padding-left: 0;
        margin: 0;
        float: left;
        list-style: none;
        box-sizing: border-box;
        position: relative;
        transition: transform 0.5s @ease-in-out;
        // width: 100%;

        &:before,
        &:after {
            display: table;
            content: " ";
        }

        &:after {
            clear: both;
        }

        .@{tabs-prefix-cls}-tab-disabled {
            pointer-events: none;
            cursor: default;
            color: #ccc;
        }

        .@{tabs-prefix-cls}-tab {
            display: inline-block;
            height: 100%;
            padding: 8px 16px;
            margin-right: 16px;
            box-sizing: border-box;
            cursor: pointer;
            text-decoration: none;
            position: relative;
            transition: color .3s @ease-in-out;
            z-index: 1;
            &:hover {
                color: @link-hover-color;
            }

            &:active {
                color: @link-active-color;
            }
            .@{css-prefix-iconfont} {
                width: 14px;
                height: 14px;
                margin-right: 8px;
            }
            &-space {
                flex: auto;
                border: 0;
                background: none;
            }
        }

        .@{tabs-prefix-cls}-tab-active {
            color: @primary-color;
        }
    }

    & {
        .@{tabs-prefix-cls}-content-animated {
            display: flex;
            flex-direction: row;
            will-change: transform;
            transition: transform .3s @ease-in-out;
        }

        .@{tabs-prefix-cls}-tabpane {
            flex-shrink: 0;
            width: 100%;
            transition: opacity .3s;
            opacity: 1;
        }

        .@{tabs-prefix-cls}-tabpane-inactive {
            opacity: 0;
            height: 0;
        }
    }
    //trapezoid style

    &&-trapezoid {
        .@{tabs-prefix-cls}-tab {

            position: relative;
            padding-left: 30px;
            margin-left: -8px;
            &:first-child {
                margin-left: 0;
            }
            &::before {
                content: '';
                position: absolute;
                top: 0;
                right: -15px;
                bottom: 0;
                left: 0;
                border: 1px solid @border-color-base;
                background-color: white;
                z-index: -1;
                transform: perspective(100px) rotateX(30deg);
                transform-origin: left;
                border-radius: 5px 10px 0 0;
            }
        }
        .@{tabs-prefix-cls}-tab-active {
            z-index: 15;
        }
    }

    // card style
    &&-card > &-bar &-nav-container {
        // height: 32px;
    }
    &&-card > &-bar &-ink-bar {
        visibility: hidden;
    }
    &&-card > &-bar &-tab {
        margin: 0;
        margin-right: 4px;
        height: 31px;
        padding: 5px 16px 4px;
        border: 1px solid @border-color-base;
        border-bottom: 0;
        border-radius: @btn-border-radius @btn-border-radius 0 0;
        transition: all 0.3s @ease-in-out;
        background: @table-thead-bg;
        &-space {
            flex: auto;
            border: 0;
            background: none;
        }
    }
    &&-card > &-bar &-tab-active {
        height: 32px;
        padding-bottom: 5px;
        background: #fff;
        transform: translateZ(0);
        border-color: @border-color-base;
        color: @primary-color;

    }
    &&-card > &-bar &-nav-wrap {
        margin-bottom: 0;
    }
    &-bar &-tab .@{css-prefix-iconfont}ios-close-empty {
        width: 0;
        height: 22px;
        font-size: 22px;
        margin-right: 0;
        color: @legend-color;
        text-align: right;
        vertical-align: middle;
        overflow: hidden;
        position: relative;
        top: -1px;
        transform-origin: 100% 50%;
        transition: all 0.3s @ease-in-out;
        &:hover {
            color: #444;
        }
    }

    &-bar &-tab-active .@{css-prefix-iconfont}ios-close-empty,
    &-bar &-tab:hover .@{css-prefix-iconfont}ios-close-empty {
        width: 14px;
        transform: translateZ(0);
    }

    &-bar&-left {
        float: left;
        border-bottom: 0;

        .@{tabs-prefix-cls}-ink-bar {
            width: 2px;
            right: 0px;
            top: 0;
            left: auto;
            z-index: 2;
        }
        .@{tabs-prefix-cls}-nav {
            .@{tabs-prefix-cls}-tab {
                display: block;
                margin-right: 0;
                border-right: 1px solid @border-color-base;
                .@{tabs-prefix-cls}-tab-space {
                    border: 0;
                }
            }
        }
    }

    &-bar&-right {
        float: right;
        border-bottom: 0;

        .@{tabs-prefix-cls}-ink-bar {
            width: 2px;
            left: 0;
            top: 0;
            right: auto;
            z-index: 2;
        }
        .@{tabs-prefix-cls}-nav {
            .@{tabs-prefix-cls}-tab {
                display: block;
                margin-right: 0;
            }
        }
    }
    &-bar&-bottom {
        .@{tabs-prefix-cls}-nav-container {
            margin-bottom: 0;
        }
        .@{tabs-prefix-cls}-ink-bar {
            z-index: 2;
        }
    }

    &&-card > &-bar&-right {
        border-left: 1px solid @border-color-base;
        .@{tabs-prefix-cls}-tab {
            border-left: 0;
            border-radius: 0 4px 4px 0;
            border-left: 1px solid @border-color-base;
            &:first-child {
                border-radius-topleft: 4px;
            }
            &:last-child {
                border-radius-bottomleft: 4px;
                margin-bottom: 0;
            }
            &-active {
                border-left: 0;
            }
        }
        .@{tabs-prefix-cls}-nav-container {
            margin-left: -1px;
        }
    }
    &&-card > &-bar&-left {
        border-right: 1px solid @border-color-base;
        .@{tabs-prefix-cls}-tab {
            border-radius: 4px 0 0 4px;
            border-right: 1px solid @border-color-base;
            &:first-child {
                border-radius-topright: 4px;
            }
            &:last-child {
                border-radius-bottomright: 4px;
                margin-bottom: 0;
            }
            &-active {
                border-right: 0;
            }
        }
        .@{tabs-prefix-cls}-nav-container {
            margin-right: -1px;
        }
    }
    &&-card > &-bar&-left, &&-card > &-bar&-right {
        .@{tabs-prefix-cls}-tab {
            margin-bottom: 16px;

            border-bottom: 1px solid @border-color-base;
        }
        .@{tabs-prefix-cls}-tab-space {
            border: 0;
        }
    }

    &&-card > &-bar&-bottom {
        border-top: 1px solid @border-color-base;
        border-bottom: 0;
        .@{tabs-prefix-cls}-tab {
            margin-top: 1px;
            border-radius: 0 0 4px 4px;
            border-bottom: 1px solid @border-color-base;
            border-top: 1px solid @border-color-base;
            &-active {
                margin-top: -1px;
                border-top: 1px solid #FFF;
            }
        }
        .@{tabs-prefix-cls}-nav-container {
            margin-top: -2px;
        }
        .@{tabs-prefix-cls}-tab-space {
            border: 0;
        }
    }
    &-frame {
        width: 100%;
        height: 100%;
    }
    &-tabspace {
        width: 100%;
        flex-shrink: 0;
    }

    .col-left, .col-right {
        transition: width .3s ;
    }


    .splitor {
        cursor: pointer;
        position: absolute;
        top: 40%;
        &.splitor-200 {
            transition: left 0.2s, right 0.2s;
        }
        &.splitor-300 {
            transition: left 0.3s, right 0.3s;
        }
        &.splitor-400 {
            transition: left 0.4s, right 0.4s;
        }
        &.splitor-500 {
            transition: left 0.5s, right 0.5s;
        }
        &.splitor-600 {
            transition: left 0.6s, right 0.6s;
        }
    }

    .aty-col-span-0 {
        display: block;
        width: 0;
    }

    //从0到半平
    .z2c-enter-active {
        transition: width .3s ease;
    }
    .z2c-leave-active {
        transition: width .3s ease;
    }
    .z2c-enter, .z2c-leave-to
    {
        widht: 0;
    }
    .z2c-enter-to, .z2c-leave    {
        widht: 50%;
    }

    //从半平到全屏
    .c2f-enter-active {
        transition: width .3s ease;
    }
    .c2f-leave-active {
        transition: width .3s ease;
    }
    .c2f-enter, .c2f-leave-to
    {
        widht: 50%;
    }

    .f2c-enter-active {
        transition: width .3s ease;
    }
    .c2f-leave-active {
        transition: width .3s ease;
    }
    .c2f-enter, .c2f-leave-to
    {
        widht: 0;
    }



}

.@{tabs-prefix-cls}-no-animation {
    > .@{tabs-prefix-cls}-content {
        transform: none !important;

        > .@{tabs-prefix-cls}-tabpane-inactive {
            display: none;
        }
    }

}




